//
//  NSManagedObject+Fetching.h
//  LibraryStorm
//
//  Created by Anh Nguyen on 4/1/14.
//  Copyright (c) 2014 3ATeam. All rights reserved.
//

#import <CoreData/CoreData.h>

@interface NSManagedObject (Fetching)

+ (NSEntityDescription *)entityDescriptionInContext:(NSManagedObjectContext *)context;
+ (NSArray *)getAllObjectsResetContext:(BOOL)isReset fetchLimit:(int)limit;
+ (NSArray *)getAllObjectsInContext:(NSManagedObjectContext *)context resetContext:(BOOL)isReset fetchLimit:(int)limit;
+ (NSArray *)getAllObjectsInContext:(NSManagedObjectContext *)context withSortDescriptor:(NSSortDescriptor *)sortDescriptor resetContext:(BOOL)isReset fetchLimit:(int)limit;
+ (NSArray *)getAllObjectsInContext:(NSManagedObjectContext *)context withSortDescriptor:(NSSortDescriptor *)sortDescriptor withPredicate:(NSPredicate *)predicate resetContext:(BOOL)isReset fetchLimit:(int)limit;
+ (NSManagedObject *)findObjectInContext:(NSManagedObjectContext *)context withPredicate:(NSPredicate *)predicate;
- (void)setObjectInContext:(NSManagedObjectContext *)context withValue:(id)value forKey:(NSString *)key;
@end
